<template>
  <div class="recommend">
    <div
      v-for="(item,index) in array"
      :key="index"
      @click="linkTo('/goods_container',item.productId)"
      class="recommend-item"
    >
      <img
        :src="item&&item.fileUrl?item.fileUrl:item.product.exampleImageUrl.fileUrl"
        alt=""
        class="recommend-item-img"
      >
      <div class="item-detail">
        <div class="text1 over-hidden">{{item.product?item.product.title:''}}</div>
        <div class="text2">
          <div class="text2-yuan">￥</div>
          <div class="text2-price">{{item.product?item.product.salePrice:''}}</div>
        </div>
        <div class="text3">
          <div class="text3-price">￥{{item.product?item.product.linePrice:''}}</div>
          <div class="text3-number">已售{{item.product?item.product.showSalesCount:0}}</div>
        </div>
      </div>

    </div>
  </div>

</template>

<script>
import { CheckIcon } from "vux";
export default {
  name: "recommend",
  data() {
    return {
	    itemfileUrl: ""
    };
  },
  props: {
    array: {
      type: Array,
      default: []
    }
  },
  mounted() {
    console.log(this.array, "eeeeeeee");
  },
  methods:{
     linkTo(path,id) {
      this.$router.push({
        path:path,
        query:{
          id:id
        }
      });
    },
  },
  components: {}
};
</script>
